package net.sx.minemodule.mvp.presenters;

import com.kedll.library.mvp.BasePresenter;
import com.kedll.library.util.ToastUtil;

import net.sx.minemodule.MineApiUtils;
import net.sx.minemodule.mvp.views.MineOrderLogisticsView;

/**
 * 描述:  订单商品 物流详情
 * author:胡邦茂
 * CreateDate: 2019/7/13 9:16
 */
public class MineOrderLogisticsPresenter extends BasePresenter<MineOrderLogisticsView> {

    public MineOrderLogisticsPresenter(MineOrderLogisticsView mView) {
        super(mView);
    }

    public void loadData(int orderProductId) {
        mView.showLoad("加载中...");
        MineApiUtils.orderLogisticsLoad(orderProductId, res -> {
            mView.hideLoad();
        }, th -> {
            mView.hideLoad();
            ToastUtil.showToast(th.getMessage());
        });


        //模拟数据
      // OrderLogisticsBean info = new OrderLogisticsBean();
      // info.setCourierName("顺丰快递");
      // info.setOrderNum("12884568232485");
      // info.setPic("http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/5ac1bf58Ndefaac16.jpg");
      // info.setStatus("派件中");

      // ArrayList<OrderLogisticsItemBean> por = new ArrayList<>();

      // por.add(new OrderLogisticsItemBean("【上海市】从上海浦东公司派件员 大鹏 176898455112 正在为您派件", "09-07 14:21", Color.parseColor("#333333"),true));
      // por.add(new OrderLogisticsItemBean("从上海浦东分拨中心发出", "09-07 14:21", Color.parseColor("#bbbbbb"),false));
      // por.add(new OrderLogisticsItemBean("在上海浦东新区南汇路北京西称重扫描", "09-07 14:21", Color.parseColor("#bbbbbb"),false));
      // por.add(new OrderLogisticsItemBean("在上海浦东新区南汇路北京西称重扫描", "09-07 14:21", Color.parseColor("#bbbbbb"),false));
      // por.add(new OrderLogisticsItemBean("已发货", "09-07 14:21", Color.parseColor("#bbbbbb"),false));
      // por.add(new OrderLogisticsItemBean("已通知快递取件", "09-07 14:21", Color.parseColor("#bbbbbb"),false));
      // por.add(new OrderLogisticsItemBean("已下单", "09-07 14:21", Color.parseColor("#bbbbbb"),false));

      // info.setList(por);
      // mView.onSucceed(info);

    }


}
